<template>
    <div class="detailbox">
      <div class="flexbox">
        <div class="shrinkbox_v2">
            企业名称：
        </div>
        <div class="contentbox_v2">
          <div class="div_input">
            {{ editData.enterpriseName }}
          </div>
        </div>
        <div class="shrinkbox_v2">
            企业代码：
        </div>
        <div class="contentbox_v2">
          <div class="div_input">
            {{ editData.enterpriseCode }}
          </div>
        </div>
      </div>
      
      <div class="flexbox">
        <div class="shrinkbox_v2">
            最大账户数量：
        </div>
        <div class="contentbox_v2">
          <div class="div_input">
            {{ editData.maxNum }}
          </div>
        </div>
        <div class="shrinkbox_v2">
            使用到期日期：
        </div>
        <div class="contentbox_v2">
          <div class="div_input">
            {{ editData.expireTime }}
          </div>
        </div>
      </div>
      
      <div class="flexbox">
        <div class="shrinkbox_v2">
            管理员账号：
        </div>
        <div class="contentbox_v2">
          <div class="div_input">
            {{ editData.userName }}
          </div>
        </div>
        <div class="shrinkbox_v2">
            默认账号密码：
        </div>
        <div class="contentbox_v2">
          <div class="div_input">
            123456
          </div>
        </div>
      </div>
  
    </div>
  </template>
  
  <script setup>
    import { ref, inject, defineEmits } from 'vue'
    // import { useStore } from 'vuex'
    // 注入全局utils工具js
    const $utils = inject('$utils')
    const editData = ref({})
    const feildConfig = ref({
      isReadonly: false
    })
    // 子传父
    const emit = defineEmits([])
  
    function initData(obj) {
      editData.value = obj.data ? obj.data : {}
      feildConfig.value = obj.feildConfig ? obj.feildConfig : feildConfig.value
    }
    function submitData() {
      console.log('提交数据')
      console.log(editData.value)
      // $utils.post({
      //   url: '/Api/Enterprise/DoSave',
      //   params: editData.value,
      //   showLoading: true,
      //   ok: function (res) {
      //     emit('close-dialog', false)
      //   }
      // })
    }
  
    defineExpose({
      initData,
      submitData
    })
  
  </script>
  
  <style scoped>
  .saveBtn {
    background-color: #4999FA;
    color: #fff;
    font-weight: normal;
    font-size: 14px;
    padding: 3px 10px;
    border-radius: 3px;
    margin-right: 10px;
  }
  .saveBtn:hover {
    /* background-color: #7BB8FB; */
    opacity: 0.8;
    cursor: pointer;
  }
  .split_title {
    background-color: #EBEEF5;
    font-size: 16px;
    height: 30px;
    align-items: center;
    font-family: '楷体';
    font-weight: bold;
    display: flex;
    position: relative;
  }
  .split_title_content {
    flex-grow: 1;
    text-align: center;
  }
  .split_title_btn {
    display: flex;
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    align-items: center;
  }
  .shrinkbox_v2 {
    width: 100px;
  }
  .diyinput :deep(.el-input__wrapper){
    border: 0 !important;
    outline: none;
    box-shadow: none;
    font-size: 12px;
  }
  .diyselect :deep(.el-select__wrapper){
    border: 0 !important;
    outline: none;
    box-shadow: none;
    font-size: 12px;
  }
  .diyselect :deep(.el-select__wrapper:hover){
    border: 0 !important;
    outline: none;
    box-shadow: none;
  }
  .diyselect :deep(.el-select__wrapper:active){
    border: 0 !important;
    outline: none;
    box-shadow: none;
  }
  /* .diyselect :deep(.el-input__wrapper){
    border: 0 !important;
    outline: none;
    box-shadow: none;
    font-size: 12px;
    pointer-events: none; 
  }
  .diyselect :deep(.el-input__wrapper:hover){
    border: 0 !important;
    outline: none;
    box-shadow: none;
  }
  .diyselect :deep(.el-input__wrapper:active){
    border: 0 !important;
    outline: none;
    box-shadow: none;
  } */
  .diyinput :deep(.el-textarea__inner){
    border: 0 !important;
    outline: none;
    box-shadow: none;
    font-size: 12px;
  }
  .diydatepicker :deep(.el-input__wrapper){
    border: 0 !important;
    outline: none;
    box-shadow: none;
    font-size: 12px;
  }
  .diyformitem {
    margin-bottom: 0;
  }
  .diydatapicker :deep(.el-date-editor){
    width: 100%;
  }
  .diydatapicker :deep(.el-input__wrapper){
    border: 0 !important;
    outline: none;
    box-shadow: none;
  }
  .diyinput :deep(.el-input-group__append){
    border: 0 !important;
    outline: none;
    background-color: unset;
    box-shadow: none;
    padding: 0 10px 0 5px;
    font-weight: bold;
    font-size: 16px;
  }
  /deep/ input::-webkit-outer-spin-button,
  /deep/ input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
  }
  /deep/ input[type='number'] {
    -moz-appearance: textfield;
  }
  </style>